package com.hutu.kboshi.adapter;

import com.hutu.kboshi.pojo.dto.user.UserInfo;
import com.hutu.kboshi.pojo.entity.User;

public class UserBuilder {
    public static UserInfo buildUserInfo(User user) {
        UserInfo loginUserVO = new UserInfo();
        loginUserVO.setId(user.getId());
        loginUserVO.setUserName(user.getUserName());
        loginUserVO.setUserAvatar(user.getUserAvatar());
        loginUserVO.setUserPermission(user.getUserPermission());
        loginUserVO.setUserProfile(user.getUserProfile());
        loginUserVO.setUserRole(user.getUserRole());
        loginUserVO.setVipExpireTime(user.getVipExpireTime());
        loginUserVO.setVipNumber(user.getVipNumber());
        loginUserVO.setSex(user.getSex());
        loginUserVO.setCreateTime(user.getCreateTime());
        loginUserVO.setUpdateTime(user.getUpdateTime());
        return loginUserVO;
    }
}
